package com.link.base.base.approval.dao.mybatis.mapper;

import com.link.base.base.approval.model.Flow;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceException;

import java.util.List;
/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author  unknwon
 * @date:   2018/11/8 15:46
 * @version 1.0
 */

public interface FlowMapper extends BasicMapper<Flow> {
    /**
     * 分页查询待审批流程
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<Flow> queryFlowListPage(Flow record) throws Exception;

    /**
     * 分页查询我申请审批流程
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<Flow> queryMyFlowListPage(Flow record) throws Exception;

    /**
     * 分页查询我的在运行的申请审批流程
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<Flow> queryMyRunFlowListPage(Flow record) throws Exception;


    /**
     * 分页查询已审批流程
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<Flow> queryFlowedListPage(Flow record) throws Exception;

    /**
     * 根据流程记录对象id查询流程
     *
     * @param record
     * @return
     * @throws BasicServiceException
     * @throws Exception
     */
    public List<Flow> queryFlowByObjId(Flow record) throws Exception;

    /**
     * 更改下一节点信息
     *
     * @param record
     * @throws Exception
     */
    public void nextNodeUpdate(Flow record) throws Exception;

    /**
     * 结束审批操作
     *
     * @param record
     * @throws Exception
     */
    public void finishFlowUpdate(Flow record) throws Exception;

}
